package spring.framework.study.model;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.Version;

import lombok.Data;

@Data
public class User {
	
	@TableId(type = IdType.AUTO)
	private Long id;
	private String name;
	private Integer age;
	private String email;
	
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;  //create_time
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime; //update_time
	
	//乐观锁版本号 
    @Version
   // @TableField(fill = FieldFill.INSERT)
    private Integer version;

//    /@TableLogic
    //@TableField(fill = FieldFill.INSERT)
   // private Integer deleted;
}
